package COMP;

import java.awt.Color;
import java.awt.Graphics;
import java.awt.Graphics2D;

import javax.swing.JComponent;



class DrawPoint extends JComponent{
	int xpos;
	int ypos;
	int pointSize;
	Color color;
	DrawPoint(int xpos,int ypos,int pointSize,Color color){
		this.xpos = xpos;
		this.ypos = ypos;
		this.pointSize = pointSize;
		this.color = color;
		this.setBounds(xpos-pointSize, ypos-pointSize,pointSize+pointSize,pointSize+pointSize);
		this.setOpaque(false);
	}
	public void paint(Graphics g){
		Graphics2D g2d = (Graphics2D)g.create();
		g2d.setColor(color);
		g2d.fillOval(pointSize/2,pointSize/2,pointSize,pointSize);
	}
}
